/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cassandrawindow;

import java.util.Map;

/**
 *
 * @author ADMIN
 */
public class ThreadGeo implements Runnable{
    public static final String BzSuperBannerGeo   =   "BannerTimestampGeoCountSuperCf";
    CassandraAction cassAct ;
    long startTime = 0;
    long finishTime = 0;
    String bannerid = "";
    Map<String, String> geoMap;
    Thread runner;

    public ThreadGeo(CassandraAction cassActValue, Map<String, String> varMap,String banneridValue, long dayStartValue,long dayLastValue)
    {
        geoMap = varMap;
        cassAct = cassActValue;
        startTime = dayStartValue;
        finishTime = dayLastValue;
        bannerid = banneridValue;
        runner = new Thread(this);
        runner.start();
    }

    public void run()
    {        
        try {
            String valueGeo = cassAct.getGeo(bannerid, BzSuperBannerGeo, startTime, finishTime);
            geoMap.put(bannerid, valueGeo);
            //Thread.sleep(5*1000);
        } catch (Exception ex){}
    }
       
}
